const express = require('express');
const bodyParser = require('body-parser')
const app = express();
// app.use(express.static('public'));
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());
app.post('/index', (req, res) => {
    console.log('post请求');
    let {a, b} = req.body;
    console.log(a, b);
    res.send('post middleware response')
}) 

app.listen('3000', () => {
    console.log('服务已启动，http://localhost:3000');
})